home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / SASC_6.0_Disk_4.adf / Compiler_Headers / Include / libraries / diskfont.h < prev    next >
C/C++ Source or Header  |  1992-07-30  |  3KB  |  111 lines

  1. #ifndef    LIBRARIES_DISKFONT_H
  2. #define    LIBRARIES_DISKFONT_H
  3. /*
  4. **    $Filename: libraries/diskfont.h $
  5. **    $Release: 2.04 Includes, V37.4 $
  6. **    $Revision: 36.6 $
  7. **    $Date: 90/11/26 $
  8. **
  9. **    diskfont library definitions
  10. **
  11. **    (C) Copyright 1985-1991 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef     EXEC_TYPES_H
  16. #include "exec/types.h"
  17. #endif
  18. #ifndef     EXEC_NODES_H
  19. #include "exec/nodes.h"
  20. #endif
  21. #ifndef     EXEC_LISTS_H
  22. #include "exec/lists.h"
  23. #endif
  24. #ifndef     GRAPHICS_TEXT_H
  25. #include "graphics/text.h"
  26. #endif
  27.  
  28. #define     MAXFONTPATH 256   /* including null terminator */
  29.  
  30. struct FontContents {
  31.     char    fc_FileName[MAXFONTPATH];
  32.     UWORD   fc_YSize;
  33.     UBYTE   fc_Style;
  34.     UBYTE   fc_Flags;
  35. };
  36.  
  37. struct TFontContents {
  38.     char    tfc_FileName[MAXFONTPATH-2];
  39.     UWORD   tfc_TagCount;    /* including the TAG_DONE tag */
  40.     /*
  41.      *    if tfc_TagCount is non-zero, tfc_FileName is overlayed with
  42.      *    Text Tags starting at:    (struct TagItem *)
  43.      *        &tfc_FileName[MAXFONTPATH-(tfc_TagCount*sizeof(struct TagItem))]
  44.      */
  45.     UWORD   tfc_YSize;
  46.     UBYTE   tfc_Style;
  47.     UBYTE   tfc_Flags;
  48. };
  49.  
  50.  
  51. #define  FCH_ID        0x0f00    /* FontContentsHeader, then FontContents */
  52. #define  TFCH_ID    0x0f02    /* FontContentsHeader, then TFontContents */
  53.  
  54. struct FontContentsHeader {
  55.     UWORD   fch_FileID;        /* FCH_ID */
  56.     UWORD   fch_NumEntries;    /* the number of FontContents elements */
  57.     /* struct FontContents fch_FC[], or struct TFontContents fch_TFC[]; */
  58. };
  59.  
  60.  
  61. #define  DFH_ID        0x0f80
  62. #define  MAXFONTNAME    32    /* font name including ".font\0" */
  63.  
  64. struct DiskFontHeader {
  65.     /* the following 8 bytes are not actually considered a part of the    */
  66.     /* DiskFontHeader, but immediately preceed it. The NextSegment is    */
  67.     /* supplied by the linker/loader, and the ReturnCode is the code    */
  68.     /* at the beginning of the font in case someone runs it...        */
  69.     /*     ULONG dfh_NextSegment;            \* actually a BPTR    */
  70.     /*     ULONG dfh_ReturnCode;            \* MOVEQ #0,D0 : RTS    */
  71.     /* here then is the official start of the DiskFontHeader...        */
  72.     struct Node dfh_DF;        /* node to link disk fonts */
  73.     UWORD   dfh_FileID;        /* DFH_ID */
  74.     UWORD   dfh_Revision;    /* the font revision */
  75.     LONG    dfh_Segment;    /* the segment address when loaded */
  76.     char    dfh_Name[MAXFONTNAME]; /* the font name (null terminated) */
  77.     struct TextFont dfh_TF;    /* loaded TextFont structure */
  78. };
  79.  
  80. /* unfortunately, this needs to be explicitly typed */
  81. /* used only if dfh_TF.tf_Style FSB_TAGGED bit is set */
  82. #define    dfh_TagList    dfh_Segment    /* destroyed during loading */
  83.  
  84.  
  85. #define     AFB_MEMORY    0
  86. #define     AFF_MEMORY    0x0001
  87. #define     AFB_DISK    1
  88. #define     AFF_DISK    0x0002
  89. #define     AFB_SCALED    2
  90. #define     AFF_SCALED    0x0004
  91.  
  92. #define     AFB_TAGGED    16    /* return TAvailFonts */
  93. #define     AFF_TAGGED    0x10000L
  94.  
  95. struct AvailFonts {
  96.     UWORD   af_Type;        /* MEMORY, DISK, or SCALED */
  97.     struct TextAttr af_Attr;    /* text attributes for font */
  98. };
  99.  
  100. struct TAvailFonts {
  101.     UWORD   taf_Type;        /* MEMORY, DISK, or SCALED */
  102.     struct TTextAttr taf_Attr;    /* text attributes for font */
  103. };
  104.  
  105. struct AvailFontsHeader {
  106.     UWORD   afh_NumEntries;     /* number of AvailFonts elements */
  107.     /* struct AvailFonts afh_AF[], or struct TAvailFonts afh_TAF[]; */
  108. };
  109.  
  110. #endif    /* LIBRARIES_DISKFONT_H */
  111.